#pragma once

#include <memory>
#include <vector>

#include <btBulletDynamicsCommon.h>
#include <physics_DebugVertex.h>

class BulletDebugDraw : public btIDebugDraw {
public:

	explicit BulletDebugDraw(std::vector<PhysicsDebugVertex> &rVertex);
	~BulletDebugDraw();

	virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& color) override;
	virtual void drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB,
		btScalar distance, int lifeTime, const btVector3& color) override {}
	virtual void reportErrorWarning(const char* warningString) override {}
	virtual void draw3dText(const btVector3& location, const char* textString) override {}
	virtual void setDebugMode(int debugMode) override { m_debugMode = debugMode; }
	virtual int	 getDebugMode() const override { return m_debugMode; }
	void ResetVertex();
private:
	int m_debugMode;
	std::vector<PhysicsDebugVertex> &m_rVertex;
};

